package com.city.service.party.impl;

import com.city.domain.party.PartyStudentLesson;
import com.city.repository.party.PartyStudentLessonRepository;
import com.city.service.party.PartyStudentLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PartyStudentLessonServiceImpl implements PartyStudentLessonService{


    @Autowired
    private PartyStudentLessonRepository partyStudentLessonRepository;
    @Override
    public void save(PartyStudentLesson partyStudentLesson) {
        partyStudentLessonRepository.save(partyStudentLesson);
    }

    @Override
    public int countUUnleaned(int studentId) {
        return partyStudentLessonRepository.countUnleaned(studentId);
    }

    @Override
    public int countAllLesson(int studentId) {
        return partyStudentLessonRepository.countAllLesson(studentId);
    }

    @Override
    public List<Integer> findIds(int studentId) {
        return partyStudentLessonRepository.findIdsByStudenId(studentId);
    }

    @Override
    public List<Integer> findHaveIds(int studentId) {
        return partyStudentLessonRepository.findHaveIdsByStudenId(studentId);
    }
}
